import { ControlVOBase } from '@/core/modules';
import { ICtrlController, IDECtrlAbility, IDECtrlStore } from '..';
import { IContext, IParam } from '../../common';
import { ICtrlService, IOpenViewResult } from '../../modules';

export interface IDECtrlController<
	S extends IDECtrlStore,
	A extends IDECtrlAbility
> extends ICtrlController<S, A> {
	/**
	 * 打开视图
	 *
	 * @return {*}  {void}
	 * @memberof IDECtrlController
	 */
	openData(
		context: IContext,
		viewParams: IParam,
		data: IParam[]
	): Promise<IOpenViewResult> | void;

	/**
	 * 新建视图
	 *
	 * @return {*}  {void}
	 * @memberof IDECtrlController
	 */
	newData(
		context: IContext,
		viewParams: IParam,
		data: IParam[]
	): Promise<IOpenViewResult> | void;

	/**
	 * 获取部件服务
	 *
	 * @return {*}  {ICtrlService<ControlVOBase>}
	 * @memberof DECtrlController
	 */
	getCtrlService(): ICtrlService<ControlVOBase>;
}
